Skip to content

Refactor: Data directory structure, R2 backup, and fixed branch strategy in workflows#29

Merged
marcarl merged 2 commits into
mainfrom
fix/use-artifacts-instead-of-git
Jan 5, 2026
Merged

Refactor: Data directory structure, R2 backup, and fixed branch strategy in workflows#29
marcarl merged 2 commits into
mainfrom
fix/use-artifacts-instead-of-git

Conversation

@marcarl
Copy link
Copy Markdown
Collaborator

@marcarl marcarl commented Jan 5, 2026

Summary

This PR modernizes the SFS workflow architecture with three major improvements:

  1. Cleaner data/ directory structure for all committed files
  2. Cloudflare R2 as permanent backup for JSON files
  3. Fixed branch strategy to eliminate branch proliferation

Changes

📁 New Directory Structure

  • data/sfs_json/ - Source JSON files (committed to git + backed up to R2)
  • data/md-markers/ - Markdown with selex tags (committed to git)
  • output/ - Generated files (ignored in git, HTML goes to R2)

☁️ Cloudflare R2 Backup

  • All JSON files synced to R2 for permanent storage
  • Provides redundancy and protection against git issues
  • html-export uses smart fallback: git first, R2 if unavailable

🔄 Fixed Branch Strategy (NEW)

  • Eliminates branch proliferation: Single branch workflow-artifact-data instead of timestamped branches
  • Automatic PR lifecycle: Old PR closed, new PR created on each update
  • Workflow coordination: Both fetch-sfs and upcoming-changes use same branch
  • Temporal branches unchanged: Date-range branches for historical commits remain separate

⚙️ Configurable Git Commits

  • enable_git_commit (default: true) - Enable/disable git commits
  • branch_name (default: workflow-artifact-data) - Configurable branch name

Benefits

Better organization - All source data in data/, generated in output/
Permanent backup - JSON files in both git and R2
No branch cleanup needed - Single fixed branch, reused on each run
Simplified coordination - All workflows use same branch
Clear naming - md-markers shows selex tags included

Before/After

Aspect Before After
Branch strategy New timestamped branch each run One fixed branch, reused
Branch cleanup Manual (never done) Automatic (single branch)
Workflow coordination Separate branches Shared fixed branch
PR management Many PRs accumulate One PR per update cycle

Testing

  • ✅ YAML syntax validated
  • Ready for manual workflow trigger to test fixed branch behavior
  • Temporal workflows remain independent and unaffected

Changes:

- Reorganize file structure: data/sfs_json/ and data/md-markers/

- Add Cloudflare R2 backup for JSON files (redundancy)

- Make git commits configurable (enable_git_commit input)

- Add smart fallback in html-export (git first, R2 as backup)

- Remove gitignore exceptions for cleaner config

This provides better organization, permanent R2 backup, and flexibility

to disable git commits when only R2 storage is needed.
Changes:

- Replace timestamped branches with fixed branch (workflow-artifact-data)

- Add automatic PR lifecycle management (close old, create new)

- Make both fetch-sfs and upcoming-changes use same branch

- Simplify html-export trigger to always use fixed branch

Benefits:

- Eliminates branch proliferation

- Single coordination point for data updates

- No manual cleanup needed

- Temporal branches remain separate
@marcarl marcarl changed the title Refactor: Move to data/ directory structure with R2 backup and configurable git commits Refactor: Data directory structure, R2 backup, and fixed branch strategy Jan 5, 2026
@marcarl marcarl changed the title Refactor: Data directory structure, R2 backup, and fixed branch strategy Refactor: Data directory structure, R2 backup, and fixed branch strategy in workflows Jan 5, 2026
@marcarl marcarl merged commit 08903e3 into main Jan 5, 2026
5 checks passed
@marcarl marcarl deleted the fix/use-artifacts-instead-of-git branch January 5, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant